package com.ruoyi.hotel.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hotel.mapper.HlBookingMapper;
import com.ruoyi.hotel.domain.HlBooking;
import com.ruoyi.hotel.service.IHlBookingService;

/**
 * 酒店预约Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-10
 */
@Service
public class HlBookingServiceImpl implements IHlBookingService 
{
    @Autowired
    private HlBookingMapper hlBookingMapper;

    /**
     * 查询酒店预约
     * 
     * @param id 酒店预约主键
     * @return 酒店预约
     */
    @Override
    public HlBooking selectHlBookingById(Long id)
    {
        return hlBookingMapper.selectHlBookingById(id);
    }

    /**
     * 查询酒店预约列表
     * 
     * @param hlBooking 酒店预约
     * @return 酒店预约
     */
    @Override
    public List<HlBooking> selectHlBookingList(HlBooking hlBooking)
    {
        return hlBookingMapper.selectHlBookingList(hlBooking);
    }

    /**
     * 新增酒店预约
     * 
     * @param hlBooking 酒店预约
     * @return 结果
     */
    @Override
    public int insertHlBooking(HlBooking hlBooking)
    {
        return hlBookingMapper.insertHlBooking(hlBooking);
    }

    /**
     * 修改酒店预约
     * 
     * @param hlBooking 酒店预约
     * @return 结果
     */
    @Override
    public int updateHlBooking(HlBooking hlBooking)
    {
        hlBooking.setUpdateTime(DateUtils.getNowDate());
        return hlBookingMapper.updateHlBooking(hlBooking);
    }

    /**
     * 批量删除酒店预约
     * 
     * @param ids 需要删除的酒店预约主键
     * @return 结果
     */
    @Override
    public int deleteHlBookingByIds(Long[] ids)
    {
        return hlBookingMapper.deleteHlBookingByIds(ids);
    }

    /**
     * 删除酒店预约信息
     * 
     * @param id 酒店预约主键
     * @return 结果
     */
    @Override
    public int deleteHlBookingById(Long id)
    {
        return hlBookingMapper.deleteHlBookingById(id);
    }
}
